package gui

import (
	"log"
	"os/exec"
)

func check(err error) {
	if err != nil {
		log.Fatalf("%s\n", err)
	}
}

//eg: dir /n
func cmd(cmdStr string) {
	cmd := exec.Command(cmdStr)
	out, err := cmd.CombinedOutput() //combine standard output and standard error.
	check(err)
	log.Printf("\n%s\n", string(out))
}
